package main

import "fmt"

type Target interface {
	request()
}

type adaptee struct {
}

func (a *adaptee) specificRequest() {
	fmt.Println("a specific request from adaptee")
}

type adapter struct {
	adaptee *adaptee
}

func (a *adapter) request() {
	fmt.Println("adapter request")
	a.adaptee.specificRequest()
}

func main() {
	adaptee := &adaptee{}
	adapter := &adapter{adaptee: adaptee}

	var target Target = adapter

	target.request()

	// Output:
	// adapter request
	// a specific request from adaptee

}
